<%--
  Created by IntelliJ IDEA.
  User: 10161
  Date: 2019/1/2
  Time: 20:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>修改新闻</title>
</head>
<body>
<form action="${pageContext.request.contextPath}/news/doupdate" method="post" enctype="multipart/form-data">
    <input name="id" type="hidden" value="${news.id}"/>
    新闻标题:<input type="text" value="${news.title}" name="title" /><br/>
    描述:<input type="text" value="${news.review}" name="review"/><br/>
    选择类别:<select name="typeId">]
    <c:forEach items="${plist}" var="it">
        <option <c:if test="${it.id==news.typeId}">selected</c:if> value="${it.id}">${it.typeName}</option >
    </c:forEach>
</select> <br/>
    作者:<input type="text" value="${news.author}" name="author"/><br/>
    详情:<textarea name="newsContent">${news.newsContent}</textarea> <br/>
    封面:<input type="file" name="a_newsImg"/><br/>
    <img width="100" height="100" src="${pageContext.request.contextPath}/statics/upload/${news.newsImg}"/>
    <input type="hidden" value="${news.newsImg}" name="newsImg" />
    <br/>

    置顶:<input checked type="radio" name="isTop" value="1"/>是<input <c:if test="${news.isTop==1}">checked</c:if> type="radio" name="isTop" value="0"/>否<br/>
    创建日期:<input type="text" value="<fmt:formatDate value="${news.createDate}" pattern="yyyy-MM-dd HH:mm"></fmt:formatDate>" name="createDate"/><br/>
    <input type="submit" value="修改新闻"/>

</form>
</body>
</html>
